import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:framelib/utils/size_util.dart';
import 'package:get/get.dart';

import 'color_util.dart';

/**
 * Toast 封装
 */
class ToastUtil{
  static toast(String msg,{Color? textColor,Color? backgroundColor,double? fontSize,ToastGravity? gravity}){
    Fluttertoast.showToast(
      msg: msg??'',
      toastLength: Toast.LENGTH_LONG,
      gravity: gravity??ToastGravity.TOP,
      timeInSecForIosWeb: 1,
      backgroundColor: backgroundColor??color_grey,
      textColor: textColor??color_white,
      fontSize: fontSize??size_15.sp,
    );
  }
}